package com.itheima.goods.service.Impl;

import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.itheima.goods.mapper.BrandMapper;
import com.itheima.goods.pojo.Brand;
import com.itheima.goods.service.BrandService;
import entity.Result;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class BrandServiceImpl extends ServiceImpl<BrandMapper, Brand> implements BrandService {

    @Autowired
    private BrandMapper brandMapper;


    /**
     * 测试用，测完注销，另外在写
     * @return
     */
    @Override
    public Result findAll(){

        QueryWrapper<Brand> queryWrapper = new QueryWrapper<>();

        List<Brand> brandList = brandMapper.selectList(queryWrapper);

        return new Result(true,20000,"成功",brandList);
    }
}
